<!-- Dom模板 -->
<template>
  <div class="box">
    <!-- Dom内容 -->
    <!-- 头部 -->
    <div class="tit-1">
      <span class="tit-1-left"
        ><i @click="gobacks" class="iconfont icon-lt"></i
        ><span class="baby">我的故事</span></span
      >
      <!-- <span class="tit-1-right"
        ><i class="iconfont icon-weixinxiaochengxu"></i
      ></span> -->
    </div>
    <!-- 内容 -->
    <div class="con" >
      <div class="con-1" id="one" v-for="(item,index) in $store.state.order.items" :key="index">
        <div class="con-1-left">
          <img :src="item.img" alt="" />
        </div>
        <div class="con-1-right">
          <p id="aq">{{item.name}}</p>
          <p>{{item.ami}}</p>
        </div>
      </div>
   
    </div>
  </div>
</template>
<script>
import * as api from "../../api/home";
export default {
  name: "",
  data() {
    return {
      msg: "测试",
      data: "",
      phone: "",
      itemMy: "",
    };
  },
  // 生命周期 - 创建完成（访问当前this实例）
  created() {},
  // 生命周期 - 挂载完成（访问DOM元素）
  mounted() {
    api.dingStory().then((res) => {
      this.data = res.data.code;
      console.log(111111, this.data);
    });
    this.phone = this.$store.state.order.user.title;
    console.log(this.phone);
    api
      .dingStory({ itemPhone: this.phone })
      .then((res) => {
        this.itemMy = res.data.code;
        console.log("我的故事", res.data.code);
        console.log(this.itemMy);
        this.$store.commit('order/myStory',this.itemMy)
        console.log(this.$store.state.order.items);
      })
      .catch((err) => {
        console.log("我的故事失败", err);
      });
  },
  // Vue方法定义
  methods: {
    gobacks() {
      this.$router.push("/my");
    },
  },
};
</script>

<style scoped>
@import url("../../../assets/font/iconfont.css");
/* @import url(''); 引入css类 */
* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}
.box {
  background: rgb(255, 255, 255);
  width: 100%;
  height: 100vh;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
}

.tit-1 {
  width: 100%;
  height: 64px;
  display: flex;
  justify-content: space-between;
  text-align: center;
  line-height: 64px;
  /* background: white; */
  /* border-bottom:1px solid #ccc ; */
}
.tit-1-left {
  margin-left: 16px;
  font-weight: 600;
  color: rgb(195, 195, 195);
}
.tit-1-right {
  color: black;
  margin-right: 16px;
  margin-top: 6px;
}
.tit-1-right i {
  line-height: 44px;
  font-size: 32px;
}
.con-low p {
  margin: 3px 0;
}
.con {
  margin: 0 auto;
  width: 92%;
  text-align: center;
  height: calc(100vh - 84px);
}
.baby {
  font-size: 18px;
  color: black;
  margin-left: 17px;
}
/* 内容1 */
.con-1 {
  width: 95%;
  height: 80px;
  margin: 20px auto 0;
  animation: bounceInRight 1s 1 cubic-bezier(0.215, 0.61, 0.355, 1);
}

@keyframes bounceInRight {
  0% {
    opacity: 0;
    transform: translate3d(3000px, 0, 0);
  }
  60% {
    opacity: 1;
    transform: translate3d(-25px, 0, 0);
  }
  75% {
    transform: translate3d(10px, 0, 0);
  }
  90% {
    transform: translate3d(-5px, 0, 0);
  }
  100% {
    transform: none;
  }
}
.con-1-left {
  width: 80px;
  height: 80px;
  float: left;
}
.con-1-left img{
  width: 80px;
  height: 80px;
}
.con-1-right {
  text-align: left;
  float: left;
  width: calc(100vw - 164px);
  height: 80px;
  margin-left: 16px;
}
/* 内容2 */
.con-2 {
  width: 95%;
  height: 80px;
  margin: 20px auto 0;
  animation: bounceInRight1 1.05s 1 cubic-bezier(0.215, 0.61, 0.355, 1);
  /* animation­delay:1s; */
}

@keyframes bounceInRight1 {
  0% {
    opacity: 0;
    transform: translate3d(3000px, 0, 0);
  }
  60% {
    opacity: 1;
    transform: translate3d(-25px, 0, 0);
  }
  75% {
    transform: translate3d(10px, 0, 0);
  }
  90% {
    transform: translate3d(-5px, 0, 0);
  }
  100% {
    transform: none;
  }
}
#one {
  width: 95%;
  height: 80px;
  margin: 20px auto 0;
  animation: bounceInRight 1s 1 cubic-bezier(0.215, 0.61, 0.355, 1);
}

#aq {
  font-size: 16px;
  font-weight: 800;
  color: black;
  /* font-family: FZZhunYuan-M02S; */
}
.con-1-right p {
  font-size: 12px;
  color: rgb(151, 151, 151);
  margin-top: 7px;
}
</style>